public class ClientClass {
    public static void main(String[] args){
        // 获取享元对象
        Fruit apple1 = FruitFlyweightFactory.getFruit("A");
        apple1.eat();

        Fruit apple2 = FruitFlyweightFactory.getFruit("A");
        apple2.eat();

        Fruit banana = FruitFlyweightFactory.getFruit("B");
        banana.eat();

        System.out.println("对象池大小: " + FruitFlyweightFactory.getPoolSize());
    }
}